import { AnimationClip, CCClass } from "cc";
import { SubStateMechine } from "../../Base/SubStateMechine";
import { StateMechine } from "../../Base/StateMechine";
import { DIRECTION_ENUM, DIRECTION_ORDER_ENUM, PARAMS_NAME_ENUM } from "../../Enum";
import State from "../../Base/State";
import DiectionSubStateMechine from "../../Base/DiectionSubStateMechine";

const BASE_URL = 'texture/player/idle/';

export default class IdleSubStateMachine extends DiectionSubStateMechine{


  constructor(fsm:StateMechine){
    super(fsm);
    console.log("我被执行了")
    this.stateMachines.set(
      DIRECTION_ENUM.TOP,
      new State(fsm,`${BASE_URL}top`,AnimationClip.WrapMode.Loop),
    )
    this.stateMachines.set(
      DIRECTION_ENUM.BOTTOM,
      new State(fsm,`${BASE_URL}bottom`,AnimationClip.WrapMode.Loop),
    )
    this.stateMachines.set(
      DIRECTION_ENUM.LEFT,
      new State(fsm,`${BASE_URL}left`,AnimationClip.WrapMode.Loop),
    )
    this.stateMachines.set(
      DIRECTION_ENUM.RIGHT,
      new State(fsm,`${BASE_URL}right`,AnimationClip.WrapMode.Loop),
    )
  }

}
